package com.primus.server.entity.store;

import com.google.common.collect.Lists;
import com.primus.server.entity.BaseEntity;
import com.primus.server.entity.user.User;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.util.List;

@Entity
@Getter
@Setter
public class Cart extends BaseEntity {

    @ManyToMany(fetch = FetchType.LAZY)
    private List<Product> products = Lists.newArrayList();

    @ManyToOne(fetch = FetchType.LAZY)
    private User user;
}
